アセンブリの FullName プロパティのチェックを無効にできますか? 厳密な命名を使用せずに同様のチェックを実行できますか? (Can a check on the FullName property of an assembly be defeated? Can a similar check be performed without the use of strong naming?)


問題の説明

アセンブリの FullName プロパティのチェックを無効にできますか? 厳密な命名を使用せずに同様のチェックを実行できますか? (Can a check on the FullName property of an assembly be defeated? Can a similar check be performed without the use of strong naming?)

私の会社は最近別の会社を買収しました。現在、新しい買収の定期的なリリースの 1 つを作成する問題を検討しています。製品はサードパーティ ソフトウェア製品のプラグインです。プラグインは機能 (貴重なデータセットをクエリする機能) を提供します。これは、新たに買収した別のリリースである専用アプリケーションを通じても提供されます。

専用アプリケーションと共有されるコードでは、データを防御します。コードを呼び出すアセンブリが証明書を使用して署名される必要があるため、アプリケーションから大量に抽出されます。これは、アセンブリの FullName の公開キーが正しい値 (証明書の公開キーの文字列表現) を持っていることを確認することによって行われます。私はセキュリティ関連の問題について十分に理解していませんが、セキュリティ上の目的で「厳密な名前付け」を使用することを具体的に思いとどまらせる多くのリソースを見てきました。 /p>

プラグインでは、プラグイン クラスを通じて機能が公開されます。このクラスは、ホスト アプリケーションの開発者によって提供された DLL で定義された基本クラスを継承します。(ホスト/プラグイン システムに使用されるフレームワークは、.net 標準ライブラリの System.AddIn 名前空間のものです。プラグインは別のプロセスとして実行されます。) 残念ながら、これらの DLL はホストの開発者によって署名されていません。したがって、プラグインに署名することはできず、署名されていない限り、セキュリティ チェックによりプラグインの動作がブロックされます。(ホスト アプリケーションの実行可能ファイルは署名されていると言われています。)

呼び出し元のアセンブリの FullName プロパティに含まれる公開キーのチェックは、実際に何かを達成しますか? 誰かが私たちのアプリケーションをクラックしたい場合、それを偽装することはできますか? それが実際に何かを達成する場合 (呼び出しアセンブリの署名を偽装することが不可能になる場合)、DLL に署名できないという事実をどのように回避できますか? つまり、コードの実行方法を制御しながら、ホスト アプリケーションでプラグインを機能させるにはどうすればよいでしょうか? ホスト アプリケーションの署名に使用される公開鍵を「ホワイトリストに登録」するだけでは十分ではありません。これは別のプロセスとして実行されるためです。

ソフトウェアの以前のリリースでは、このチェックが無効になっていると考えられていますが、明らかにこれは望ましくありません。


リファレンスソリューション

方法 1:

If you're verifying the strong name matches the one you're expecting (including public signature), then you are verifying that it has not been tampered with.

That is you are verifying the assembly is what you expect, however unless you know exactly what that assembly is doing you should not trust it.

This holds true as long as the private key has been kept secure. If this has been leaked at any point then an attacker could have used it to sign another assembly.

See this answer for more info.

(by HammeriteSilverlightFox)

リファレンスドキュメント

  1. Can a check on the FullName property of an assembly be defeated? Can a similar check be performed without the use of strong naming? (CC BY‑SA 2.5/3.0/4.0)

#signing #Security #.net-assembly #C#






関連する質問

Google アクセス トークンを使用してユーザー プロファイルを取得するにはどうすればよいですか (How do I get user profile using Google Access Token)

コード署名ツールでMac開発者証明書を使用してJavaアプリケーションに署名するにはどうすればよいですか? (How to use Mac Developer Certificate with codesign tool to sign Java application?)

apk の署名中にエラーが発生しました: 見つかりません (Error during signing apk: unable to find)

JwtSecurityTokenHandler.CreateToken で署名するときに「無効なアルゴリズムが指定されました」 ("Invalid algorithm specified" when signing with JwtSecurityTokenHandler.CreateToken)

アセンブリの FullName プロパティのチェックを無効にできますか? 厳密な命名を使用せずに同様のチェックを実行できますか? (Can a check on the FullName property of an assembly be defeated? Can a similar check be performed without the use of strong naming?)

Cordova Build.json のパスワード セキュリティ (Cordova Build.json password security)

アプリリリース用の keytool による秘密鍵の取得 (Obtaining a private key through the keytool for app release)

android bundleRelease は aab に署名しません (android bundleRelease does not sign the aab)

証明書に iOS 署名証明書を作成する (create ios signing certificate in my certificates)

APKに署名する必要がある理由は何ですか? (What reasons does it have to sign apk?)

signtool.exe エラー: Excel マクロの署名時に SignerSign() が失敗しました (-2147220492/0x800403f4) (signtool.exe Error: SignerSign() failed (-2147220492/0x800403f4) when signing Excel Macro)

署名付き URL のこの実装は、かなり安全ですか? (Is this implementation of signed URLs reasonably secure?)







コメント